﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace TownCrier.Infrastructure.Entities {
    /// <summary>
    /// Class that holds the bulk of the channel settings for now
    /// </summary>
    /// 

    /* In general, this class needs a lot more work
     * Currently we are just adding it for refactoring
     * purposes. But oAuth should be a separate class,
     * and API config items should be on their own.
     * This would require new config sections.
     * TODO refactor this into something normal.
     * 
    */
    public class ChannelSettings {

        public OAuthSettings OAuth { get; set; }
        public string BaseUrl { get; set; }
        public string ResourcePath { get; set; }


        public ChannelSettings(string compositeString) {
            string[] buffer = compositeString.Split(',');
            OAuth = new OAuthSettings();
            OAuth.ApiKey = buffer[0];
            OAuth.ApiSecret = buffer[1];
            OAuth.AccessToken = buffer[2];
            OAuth.TokenSecret = buffer[3];
        }

        public ChannelSettings(object sectionName) { }

        //public ChannelSettings(BaseChannelSection)


    }

}
